package cn.iocoder.yudao.module.api.shop.info.enums;

import cn.iocoder.yudao.framework.common.core.ArrayValuable;
import com.baomidou.mybatisplus.annotation.EnumValue;
import lombok.Getter;
import lombok.RequiredArgsConstructor;

import java.util.Arrays;

/**
 * 店铺状态
 *
 * @author 山野羡民（1032694760@qq.com）
 */
@RequiredArgsConstructor
@Getter
public enum ShopStatusEnum implements ArrayValuable<Integer> {

    UNAVAILABLE(0, "未开通"),
    OPENING(1, "营业中"),
    CLOSING(2, "停业中");

    public static final Integer[] ARRAYS = Arrays.stream(values()).map(ShopStatusEnum::getValue).toArray(Integer[]::new);

    /**
     * 枚举值
     */
    @EnumValue
    private final Integer value;
    /**
     * 枚举描述
     */
    private final String desc;

    @Override
    public Integer[] array() {
        return ARRAYS;
    }

}
